#ifndef SPRINGROOT_H
#define SPRINGROOT_H

#include "Affector.h"
#include "Entity.h"

/**
 * The SpringRoot class describes a Spring (in the physics sense)
 * that can affect the specified objects around it. A Spring can be
 * customized to affect certain objects and at a certain magnitude.
 * Objects that a spring affects appear to snap back to the equilibrium
 * length of the spring. The spring will not move from it's current position
 * unless the spring is passed to another affector. If you want two objects
 * to be attached to by a spring, have a look at the springForce method
 * in Enigma.h
 */

class SpringRoot: public Affector, public Entity {
private:
	
public:
	float k;
	float length;

	SpringRoot();
	SpringRoot(float k, float length);
	void affect(Entity *);
	void customAffect(Entity *, float k, float length);
};

#endif